import request from "../utils/axios";

export const addMovie = (params:any) => {
    return request.post('/api/movie/addMovie/', params)
}

export const delMovie = (params:any) => {
    return request.get('/api/movie/delMovie/', {
        data: params
    })
}

export const getHotMovie = (params:any) => {
    return request.get('/api/movie/getHotMovie/'+ params.cityname)
}

export const getLikeMovie = (params:any) => {
    return request.get(`/api/movie/getLikeMovie/${params.cityname}/${params.userId}`)
}

export const getAllMovieByCinema = (params:any) => {
    return request.get('/api/cinemaMovie/getAllMovieByCinema/'+ params.cinemaId)
}

export const getMovieById = (params:any) => {
    return request.get(`/api/movie/getMovieById/${params.movieId}`)
}

export const getScheduledMovie = (params:any) => {
    return request.get(`/api/movie/getScheduledMovie/${params.cityname}/${params.date}`)
}

export const getAllMovieOrderByView = (params:any) => {
    return request.get(`/api/movie/getAllMovieOrderByView/${params.cityname}`)
}

export const getMovieByCondition = (params:any) => {
    return request.post(`/api/movie/getMovieByCondition`,params)
}

export const getMovieByKeyword = (params:any) => {
    return request.post('/api/movie/getMovieByKeyword/', params)
}

export const getUnJoinMovieByCinema = (params:any) => {
    return request.get('/api/cinemaMovie/getUnJoinMovieByCinema/'+ params.cinemaId)
}

export const addCinemaMovie = (params:any) => {
    return request.get(`/api/cinemaMovie/addCinemaMovie/${params.cinemaId}/${params.movieId}/${params.userId}`)
}

export const delCinemaMovie = (params:any) => {
    return request.get(`/api/cinemaMovie/delCinemaMovie/${params.cinemaId}/${params.movieId}`)
}

export const getMovieChart = (params:any) => {
    return request.post(`/api/movie/getMovieChart`, params)
}



